package be.ipl.finito.domaine;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;

import javax.ejb.Singleton;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;


@SuppressWarnings("serial")
@Entity
@Table(name="jetons", schema="finito")
public class Jeton implements Serializable{

	public static final int NBR_MAX_JETON = 12;


	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;
	@Column(unique=true)
	private int valeur;

	
	/**
	 * 
	 * QUESTION COMMENT EMPECHE LE SYSTEM DE RECREE DES JETON LORS DE L INITIALISATION?
	 * 
	 * 
	 */
	protected Jeton(){

	}

	public Jeton(int valeur){
		this.valeur = valeur;
	}

	public int getId(){
		return id;
	}

	public int getValeur(){
		return valeur;
	}

	
	
	/**
	 * TODO OPTIMISABLE
	 * @return
	 */
public  Map<Integer, Jeton> tirage() {
		return null;
	}
}


